﻿/**************************************************************************
* @file :	
* @brief :  
* @author : C0946639 尹志刚
* @version : 1.0.0.1
* @date :	2025/07/19
* @note : 参考资料 
			https://www.cnblogs.com/onepixel/p/7674659.html
			https://blog.csdn.net/cpb____/article/details/114917782
***************************************************************************/

#ifndef SORTINGALGORITHM_H
#define SORTINGALGORITHM_H

#include <QObject>

namespace GeneralAlgorithm {

	class SortingAlgorithm : public QObject
	{
		Q_OBJECT

	public:
		explicit SortingAlgorithm(QObject *parent = nullptr);
		~SortingAlgorithm();

		/**
		 * @brief	bubbleSortAlgorithm 冒泡排序
		 * @param  
		 * @return 
		 */
		void bubbleSortAlgorithm(int arr[], int n);

		/**
		 * @brief	selectionSortAlgorithm 选择排序
		 * @param  
		 * @return 
		 */
		void selectionSortAlgorithm(int arr[], int len);

		/**
		 * @brief	InsertionSortAlgorithm  插入排序
		 * @param  
		 * @return 
		 */
		void InsertionSortAlgorithm(int arr[], int len);

		/**
		 * @brief	ShellSortAlgorithm 希尔排序
		 * @param  
		 * @return 
		 */
		void ShellSortAlgorithm(int arr[], int len);

	};
}//namespace GeneralAlgorithm

#endif // SORTINGALGORITHM_H